#include <bits/stdc++.h>
using namespace std;
int main()
{
    int len; 
    freopen("template.txt","r",stdin);
    vector<int> a(len,0),b(len,0);
    cin>>len;
	cin>>a[0];
	b[0] = a[0];
    for(int i=1;i<len;i++){
        cin>>a[i];
        b[i] = a[i] - a[i-1];
    } 
    int opt;cin>>opt;
    vector<vector<int> > op;
    for(int i=0;i<opt;i++){
        vector<int> ops;
        int from,to,opn;cin>>from>>to>>opn;
        ops.push_back(from);ops.push_back(to);ops.push_back(opn);
        op.push_back(ops);
    }
  
     for(int i=0;i<opt;i++){
       int from = op[i][0],to = op[i][1],x = op[i][2];
       b[from] = b[from] + x;
       b[to+1] = b[to+1] - x;
    }
  
    

    for(int i=1;i<len;i++){
        b[i] = b[i] + b[i-1];
    }  


    cout<<"result new arr :b_arr "<<endl;
    for(int i=0;i<len;i++){
    	cout<<b[i]<<" "; 
    }


    return 0;
}
